package com.xjgc.common;



public enum ResultEnum {
    SUCCESS("0","操作成功"),
    FAILED("1","操作失败"),
    WAIT("-1","正在处理结果");

    private String code;
    private String des;
    ResultEnum(String code,String des) {
        this.code = code;
        this.des = des;
    }

    public String getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }

    public static ResultEnum valueOf(int code){
        if (code == 1){
            return SUCCESS;
        }else if (code == 0){
            return FAILED;
        }else{
            return WAIT;
        }
    }
}
